<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>6-事件解绑</title>
		<script type="text/javascript" src="js/jquery2.1.4.min.js"></script>
		<style type="text/css">
			div{
				width:100px;
				height:100px;
				line-height:100px;
				text-align: center;
				background:red;
				color:#fff;
			}
			p{
				width:100px;
				height:30px;
				color:#fff;
				background:blue;
			}
		</style>
	</head>
	<body>
		<div>百度</div>
		<p>乌东大战打响 最惨烈巷战开始了</p>
		<script type="text/javascript">
			$(function(){
				//on
				/* $('div').on('click',function(){
					console.log('test....');
					//alert(1);
					$('p').animate({
						width:200,
						height:100
					},100,function(){
						console.log('动画结束了...');
						$('div').off('click');
					});
				}); */
				//off
				//$('div').off('click');
				
				$('div').one('click',function(){
					alert(1);
				});
			});
		</script>
	</body>
</html>
